package cn.openea.perpartner.meily.web.mapper;

import cn.openea.perpartner.meily.web.entity.ProvideSamplesSub;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * 
 * 
 * @author ysk
 * @email zane_ysk@qq.com
 * @date 2023-03-27 11:37:04
 */
@Mapper
public interface ProvideSamplesSubMapper extends BaseMapper<ProvideSamplesSub> {

    @Select("select count(1) from meily_provide_samples_sub where 1=1 ${ew.customSqlSegment}")
	long getDuringRecordNum(@Param("ew") QueryWrapper<ProvideSamplesSub> wrapper);

    /**
     * 查询某个样品的相关指标 如评价数 参与样品领取的相关等级人数
     */
    Map<String, Object> indicatorQuery(@Param("mainId") String mainId);
}
